maru_design2 2.31.1 → 3.1.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/CHANGELOG.md +59 -0
- package/dist/components/atoms/badge/Badge.d.ts +40 -3
- package/dist/components/atoms/button/Button.d.ts +18 -0
- package/dist/components/atoms/checkbox/Checkbox.d.ts +6 -2
- 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 +10 -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 +4 -4
- package/dist/components/molecules/calendar/Calendar.d.ts +40 -2
- package/dist/components/molecules/calendar/DatePickerHeader.d.ts +9 -1
- package/dist/components/molecules/calendar/DatePickerWrapper.d.ts +5 -6
- package/dist/components/molecules/calendar/calendar-utils.d.ts +11 -0
- package/dist/components/molecules/dropdown/Dropdown.d.ts +28 -3
- package/dist/components/molecules/dropdown/OverflowText.d.ts +5 -0
- package/dist/components/molecules/dropdown/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/menu/MenuItem.d.ts +5 -7
- package/dist/components/molecules/dropdown/menu/index.d.ts +13 -8
- package/dist/components/molecules/dropdown/toggleButton/Arrow.d.ts +5 -8
- package/dist/components/molecules/dropdown/toggleButton/Clear.d.ts +4 -5
- package/dist/components/molecules/dropdown/toggleButton/index.d.ts +16 -2
- package/dist/components/molecules/dropdown/types.d.ts +28 -0
- 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 +19 -2
- package/dist/components/molecules/multiSelectDropdown/menu/MenuItem.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/menu/index.d.ts +10 -3
- package/dist/components/molecules/multiSelectDropdown/toggleButton/Arrow.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/Clear.d.ts +3 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/index.d.ts +10 -2
- 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 +26 -15
- 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 +4 -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 +3 -1
- package/dist/components/molecules/table/types.d.ts +15 -0
- package/dist/components/molecules/tabs/Tab.d.ts +12 -0
- package/dist/components/molecules/tabs/Tabs.d.ts +27 -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 +676 -0
- package/dist/constants/figmaColor.d.ts +327 -0
- package/dist/constants/input.d.ts +2 -0
- package/dist/constants/toast.d.ts +2 -0
- package/dist/enums/color.d.ts +165 -6
- package/dist/enums/size.d.ts +6 -3
- 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 +4385 -1750
- 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 +37 -8
- package/mise.toml +0 -3
|
@@ -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;
|
|
@@ -6,6 +6,8 @@ interface Props {
|
|
|
6
6
|
onSortClick: (columnName: string) => () => void;
|
|
7
7
|
hasCheckbox?: boolean;
|
|
8
8
|
allCheckbox: boolean;
|
|
9
|
+
allCheckboxIndeterminate: boolean;
|
|
10
|
+
allCheckboxDisabled: boolean;
|
|
9
11
|
onAllCheck: (checked: boolean) => void;
|
|
10
12
|
hasRadio?: boolean;
|
|
11
13
|
filter?: IFilter;
|
|
@@ -13,5 +15,5 @@ interface Props {
|
|
|
13
15
|
setFilterToggle: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
16
|
hasActionCol: boolean;
|
|
15
17
|
}
|
|
16
|
-
declare function THead({ formats, sort, onSortClick, hasCheckbox, allCheckbox, onAllCheck, hasRadio, filter, filterToggle, setFilterToggle, hasActionCol, }: Props):
|
|
18
|
+
declare function THead({ formats, sort, onSortClick, hasCheckbox, allCheckbox, allCheckboxIndeterminate, allCheckboxDisabled, onAllCheck, hasRadio, filter, filterToggle, setFilterToggle, hasActionCol, }: Props): React.JSX.Element;
|
|
17
19
|
export default THead;
|
|
@@ -50,6 +50,14 @@ export interface TableProps {
|
|
|
50
50
|
* 체크박스에 체크된 아이디들. radioCheckedId와 같이 쓸 수 없음.(@v1 hasCheckbox, checkedArray)
|
|
51
51
|
*/
|
|
52
52
|
checkedIds?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* 행별 체크박스 상태. hidden, disabled의 기본값은 false.
|
|
55
|
+
* 숨김/비활성 체크박스는 전체 선택·해제 대상에서 제외하며 기존 체크 상태는 유지.
|
|
56
|
+
*/
|
|
57
|
+
getCheckboxStatus?: (row: Record<string, any>, rowId: string) => {
|
|
58
|
+
hidden?: boolean;
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
};
|
|
53
61
|
/**
|
|
54
62
|
* (@v1 setCheckedArray)
|
|
55
63
|
*/
|
|
@@ -106,6 +114,13 @@ export interface TableProps {
|
|
|
106
114
|
rowIds: string[];
|
|
107
115
|
className?: string;
|
|
108
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* 비활성화할 행과 추가 스타일 지정. 비활성 행은 행 클릭, 선택 및 내장 액션을 실행하지 않음.
|
|
119
|
+
*/
|
|
120
|
+
disabledRows?: {
|
|
121
|
+
rowIds: string[];
|
|
122
|
+
className?: string;
|
|
123
|
+
};
|
|
109
124
|
className?: string;
|
|
110
125
|
id?: string;
|
|
111
126
|
/**
|
|
@@ -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,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './tabs.scss';
|
|
3
|
+
export type TabsVariant = 'line' | 'button';
|
|
4
|
+
export type TabsSize = 'compact' | 'comfortable';
|
|
5
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
6
|
+
/**
|
|
7
|
+
* 현재 선택된 탭의 값
|
|
8
|
+
*/
|
|
9
|
+
value: string;
|
|
10
|
+
/**
|
|
11
|
+
* 선택된 탭이 변경될 때 호출되는 함수
|
|
12
|
+
*/
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
/** 라인형 또는 버튼형 탭. 기본값은 line입니다. */
|
|
15
|
+
variant?: TabsVariant;
|
|
16
|
+
/** 라인형 탭의 좌우 간격. 버튼형은 항상 Comfortable 규격입니다. */
|
|
17
|
+
size?: TabsSize;
|
|
18
|
+
/**
|
|
19
|
+
* 탭이 컨테이너 너비를 동일한 비율로 채울지 여부
|
|
20
|
+
*/
|
|
21
|
+
fullWidth?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Tab 컴포넌트 목록
|
|
24
|
+
*/
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
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;
|